package cn.iocoder.yudao.module.eval.dal.mysql.venueequipment;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.eval.dal.dataobject.venueequipment.VenueEquipmentDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.eval.controller.admin.venueequipment.vo.*;

/**
 * 场地设备 Mapper
 *
 * @author 龙头企业
 */
@Mapper
public interface VenueEquipmentMapper extends BaseMapperX<VenueEquipmentDO> {

    default PageResult<VenueEquipmentDO> selectPage(VenueEquipmentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<VenueEquipmentDO>()
                .likeIfPresent(VenueEquipmentDO::getName, reqVO.getName())
                .eqIfPresent(VenueEquipmentDO::getUnit, reqVO.getUnit())
                .eqIfPresent(VenueEquipmentDO::getQuantity, reqVO.getQuantity())
                .eqIfPresent(VenueEquipmentDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(VenueEquipmentDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(VenueEquipmentDO::getId));
    }

}